#ifndef _OCPP_GribReader_H__
#define _OCPP_GribReader_H__

#include "OCVolume/VolumeOptions.h"
#include "OCVolume/VolumeCompute.h"
#include "GribDefine.h"
#include "json/json.h"

namespace OCPP
{
	using namespace Volume;
	class _GribExport GribReader
	{
	public:
		GribReader();
		~GribReader();

		bool open(String fileName, bool printDescription);
		Json::Value getVars();
		void extract(String varName,const VolumeOptions& options, int levelIndex = -1, int timeIndex = -1);
		static void extract(VolumeComputeList computeList
			, std::shared_ptr<VolumeAlgorithm> ncAlgorithm
			, const VolumeOptions& options
			, int levelIndex = -1
			, int timeIndex = -1);
	private:
		std::unique_ptr<GribWrapper> ncWrapper;
		String mFileName;
	};
}


#endif // !_OCPP_GribReader_H__
